<form class="well form-search form-inline" method="post" action="">
    <div class="form-group">
        <label >单位工程名称</label>
        <select class="sheetType form-control" style="margin-top:">
            <foreach name="options" item="vo">
                <option value="{$key}" <if condition="$vo['position_name'] eq $sheet">selected</if>>{$vo.position_name}</option>
            </foreach>
        </select>
    </div>
</form>
<table class="table table-hover table-bordered">
    <thead>
        <tr>
            <th colspan="12" style="font-size:20px;">表1-1-2 单位工程报价汇总表</th>
        </tr>
        <tr>
            <th rowspan="2" style="width: 60px;" >序号</th>
            <th rowspan="2">内容</th>
            <th rowspan="2">报价合计（元）</th>
            <th rowspan="2">累计完成百分比</th>
            <th rowspan="2">至上期末累计完成</th>
            <th rowspan="2">至上期末监理审核完成（元）</th>
            <th colspan="3">本期完成（元）</th>
            <th colspan="3">本期监理审核（元）</th>
        </tr>
        <tr>
            <th>建筑工程</th>
            <th>安装工程</th>
            <th>合计</th>
            <th>建筑工程</th>
            <th>安装工程</th>
            <th>合计</th>
        </tr>
    </thead>
     <tbody>
    <foreach name="results" item="vo">
        <tr>
            <td class="text-center">
                <if condition="stripos($vo['order_id'],'总报价') nheq false">
                    总报价<br/>(大写)
                    <else/>
                    {$vo.order_id}
                </if>
            </td>
            <if condition="$vo['list_total_amount'] neq ''">

                <td>{$vo.item_name}</td>
                <td>
                    <if condition="$vo['list_total_amount'] neq 0" >
                        {$vo.list_total_amount}
                    </if>
                </td>
                <td>
                <!--格式化时间@刘燕-->
                <if condition="$vo['list_total_amount'] eq 0" >
                <else/>
                    <php>
                        echo round($vo['cumulative_completion_percent'],2)
                    </php>%
                </if>
                </td>
                <td>{$vo.last_report_accumulated_amount}</td>
                <td>{$vo.last_approved_accumulated_amount}</td>
                <if condition="$vo['report_construction_amount'] eq '' AND $vo['report_installation_amount'] eq '' ">
                    <td colspan="3">
                         <if condition="$vo['list_total_amount'] neq 0" >
                                {$vo.report_total_amount}
                        </if>
                    </td>
                <else />
                    <td>{$vo.report_construction_amount}</td>
                    <td>{$vo.report_installation_amount}</td>
                    <td>{$vo.report_total_amount}</td>
                </if>
                <if condition="$vo['approved_construction_amount'] eq '' AND $vo['approved_installation_amount'] eq '' ">
                <td colspan="3">
                         <if condition="$vo['list_total_amount'] neq 0" >
                                {$vo.approved_total_amount}
                        </if>
                    </td>
                <else />
                    <td>{$vo.approved_construction_amount}</td>
                    <td>{$vo.approved_installation_amount}</td>
                    <td>{$vo.approved_total_amount}</td>
                </if>

            <elseif condition="stripos($vo['order_id'],'总报价') nheq false"/>
                <td colspan="8" class="text-center">{$vo.item_name}</td>
                <td colspan="3">元整</td>
            <else />
                <td>{$vo.item_name}</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td colspan="3"></td>
                <td colspan="3"></td>
            </if>
        </tr>
    </foreach>
    </tbody>            
</table>
<script type="text/javascript">
$(document).ready(function(e) {
    $(".sheetType").change(function(){
        $(".showContent").load("{:U('PaymentReview/qpsview', array('id'=>I('request.id/s','')))}&sheet=" + $(".sheetType").val());
    });
});
</script>